package com.bone.eventsweb.utils;

public class Result {
    private String code;
    private String message;

    public Result(String code, String message) {
        this.code  = code;
        this.message = message;
    }

    public static Result fail() {
        return new Result("500", "注册失败");
    }

    public static Result ok() {
        return new Result("200", "注册成功");
    }


    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static Result success(String message) {
        return new Result("0000", message);
    }


    public static Result error(String code, String message) {
        return  new Result(code, message);
    }


}
